package com.sun.dailyprj.view;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.sun.dailyprj.R;
import com.sun.dailyprj.databinding.ActivityDividerLayoutBinding;
import com.sun.dailyprj.util.Logger;

public class DividerActivity extends AppCompatActivity{

    private ActivityDividerLayoutBinding mDividerBinding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mDividerBinding = DataBindingUtil.setContentView(this, R.layout.activity_divider_layout);
        mDividerBinding.setDivider(this);
    }

    public void onBtnClick(View view) {
        Logger.debug("onBtnClick()");
        if(mDividerBinding.btn3.getVisibility() == View.VISIBLE)
            mDividerBinding.btn3.setVisibility(View.GONE);
        else
            mDividerBinding.btn3.setVisibility(View.VISIBLE);
    }
}
